package manager.match.basic.type;

import com.fasterxml.jackson.annotation.JsonIgnore;

import manager.match.basic.state.EnrollPlayerState;
import manager.player.basic.type.BasicPlayerInfo;

public class EnrollPlayerInfo {
	private String songId = "";
	private int machineId = -1;
	private int isChallenger = -1; // 1 means is challenger, 0 means normal player
	private int state = EnrollPlayerState.WAITING; //MATCHING_PLAYER_STATE
	private BasicPlayerInfo playerInfo = null;
	private String privateIp = "";
	private int privatePort = 0;
	private String publicIp = "";
	private int publicPort = 0;

	
	@JsonIgnore boolean isConnected = true;
	@JsonIgnore long startTime = System.currentTimeMillis();
	public boolean isConnected() {
		return isConnected;
	}
	public void setConnected(boolean isConnected) {
		this.isConnected = isConnected;
		setStartTime(System.currentTimeMillis());
	}
	public long getStartTime() {
		return startTime;
	}
	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}
	public String getPrivateIp() {
		return privateIp;
	}
	public void setPrivateIp(String privateIp) {
		this.privateIp = privateIp;
	}
	public int getPrivatePort() {
		return privatePort;
	}
	public void setPrivatePort(int privatePort) {
		this.privatePort = privatePort;
	}
	public String getPublicIp() {
		return publicIp;
	}
	public void setPublicIp(String publicIp) {
		this.publicIp = publicIp;
	}
	public int getPublicPort() {
		return publicPort;
	}
	public void setPublicPort(int publicPort) {
		this.publicPort = publicPort;
	}
	
	public String getSongId() {
		return songId;
	}
	public void setSongId(String songId) {
		this.songId = songId;
	}
	public int getMachineId() {
		return machineId;
	}
	public void setMachineId(int machineId) {
		this.machineId = machineId;
	}
	public int getIsChallenger() {
		return isChallenger;
	}
	public void setIsChallenger(int isChallenger) {
		this.isChallenger = isChallenger;
	}
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	public BasicPlayerInfo getPlayerInfo() {
		return playerInfo;
	}
	public void setPlayerInfo(BasicPlayerInfo playerInfo) {
		this.playerInfo = playerInfo;
	}
}
